<?php
	// 用于年级作息时间
	// 转换‘周几’为中文，周一-周日 => 1-7
	function transform_schedule_week_to_chinese($weekday) {
		switch($weekday){
			case 1:
				return '周一';
			case 2:
				return '周二';
			case 3:
				return '周三';
			case 4:
				return '周四';
			case 5:
				return '周五';
			case 6:
				return '周六';
			case 7:
				return '周日';
			default:
				return '';
		}
	}

	function transform_schedule_week_to_chinese_long($weekday) {
		switch($weekday){
			case 1:
				return '星期一';
			case 2:
				return '星期二';
			case 3:
				return '星期三';
			case 4:
				return '星期四';
			case 5:
				return '星期五';
			case 6:
				return '星期六';
			case 7:
				return '星期日';
			default:
				return '';
		}
	}

	// 转换date('w')获取的值为作息时间的week(即1-7代表周一到周日)
	function transform__to_schedule_week($weekday) {
		if($weekday == 0) {
			return 7;
		} else {
			return $weekday;
		}
	}